<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/common/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/common/bootstrap/css/bootstrap.css" media="all">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/common/global.css" media="all">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/style/css/personal.css" media="all">
</head>
<body>
<section class="layui-larry-box">
    <div class="larry-personal">
        <div class="layui-tab">
            <blockquote class="layui-elem-quote news_search">

                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <input value="" placeholder="请输入关键字" class="layui-input search_input" type="text">
                    </div>
                    <a class="layui-btn search_btn">查询</a>
                </div><div class="layui-inline">
                <a class="layui-btn layui-btn-normal newsAdd_btn">添加管理员</a>
            </div>
                <div class="layui-inline">
                    <a class="layui-btn recommend" style="background-color:#5FB878">热门景点</a>
                </div>
                <div class="layui-inline">
                    <a class="layui-btn audit_btn">审核</a>
                </div>
                <div class="layui-inline">
                    <a class="layui-btn layui-btn-danger batchDel">批量删除</a>
                </div><tr/>
                <div class="layui-inline">
                    <div class="layui-form-mid layui-word-aux">本页面刷新后除新添加的文章外所有操作无效，关闭页面所有数据重置</div>
                </div>
            </blockquote>
            <table class="layui-table" id="test" lay-filter="test"></table>
        </div>
    </div>
</section>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="style/js/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/style/js/newslist.js"></script>

<script type="text/javascript" src="${pageContext.request.contextPath}/style/common/layui/layui.js"></script>

<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-mini news_edit">
        <i class="iconfont icon-edit"></i> 编辑
    </a>
    <a class="layui-btn layui-btn-danger layui-btn-mini news_del" data-id="1">
        <i class="layui-icon"></i> 删除
    </a>
</script>
<%--分页--%>
<div class="larry-table-page clearfix">
    <div id="page" class="page"></div>
</div>
<script>
    layui.use('table', function(){
        var table = layui.table;
        table.render({
            elem: '#test'
            ,url:'${pageContext.request.contextPath}/SightDetailController/getSightDetail'
            ,title: '管理员数据表'
            ,cols: [[
                /*{type: 'checkbox', toolbar: '#allChoose', width:80}*/
                 {field:'sightId', title:'景点ID', width:80, unresize: true, sort: true}
                ,{field:'sightName', title:'景点名', width:100, edit: 'text'}
                ,{field:'sightAdd', title:'景点地址', width:100, edit: 'text'}
                ,{field:'sightPrice', title:'景点门票', width:100, edit: 'text'}
                ,{field:'sightOpenTime', title:'景点开放时间', width:100, edit: 'text'}
                ,{field:'sightDescribe', title:'景点介绍', width:100, edit: 'text'}
                ,{field:'sightImg', title:'景点图片', width:100}
                ,{field:'sightStatus', title:'景点状态', width:100, edit: 'text'}
                ,{title:'操作', toolbar: '#barDemo', width:150}
            ]],
            request:{pageName:'pageNum',limitName:'pageSize'}
            ,page: true
            ,limit:5
            ,limits:[3,5,8,10,15,20]
        });
    });
    layui.use(['jquery','layer','element','laypage'],function(){
        window.jQuery = window.$ = layui.jquery;
        window.layer = layui.layer;
        var element = layui.element(),
            laypage = layui.laypage;


        laypage({
            cont: 'page',
            pages: 10 //总页数
            ,
            groups: 5 //连续显示分页数
            ,
            jump: function(obj, first) {
                //得到了当前页，用于向服务端请求对应数据
                var curr = obj.curr;
                if(!first) {
                    //layer.msg('第 '+ obj.curr +' 页');
                }
            }
        });

        laypage({
            cont: 'page2',
            pages: 10 //总页数
            ,
            groups: 5 //连续显示分页数
            ,
            jump: function(obj, first) {
                //得到了当前页，用于向服务端请求对应数据
                var curr = obj.curr;
                if(!first) {
                    //layer.msg('第 '+ obj.curr +' 页');
                }
            }
        });
    });
</script>
</body>
</html>